package cn.sykj.car.service;

import cn.sykj.car.entity.Region;
import cn.sykj.car.vo.RegionVO;
import cn.sykj.car.vo.ResponseMessageVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 中国地区信息 服务类
 * </p>
 *
 * @author yixu
 * @since 2020-06-18
 */
public interface IRegionService extends IService<Region> {

    /**
     * 根据模型id，查询未使用的配置地址
     * @param mouldId
     * @return
     * @throws Exception
     */
    public List<RegionVO> listNotExists(Long mouldId) throws Exception;

    /**
     * 根据配送区域配置freight_model_detail.id 获取已选中的配送区域
     * @param mouldDetailId
     * @return
     * @throws Exception
     */
    public List<RegionVO> listExists(Long mouldDetailId) throws Exception;


    /**
     * 查询全部
     * @return
     * @throws Exception
     */
    public List<RegionVO> all() throws Exception;

    /**
     * 查询全部
     * @return
     * @throws Exception
     */
    public List<RegionVO> listL3() throws Exception;

    /**
     * 添加地区
     * @param region
     * @return
     * @throws Exception
     */
    public ResponseMessageVO addRegion(Region region) throws Exception;

    /**
     * 删除地区
     *
     * @param id
     * @return
     * @throws Exception
     */
    public  ResponseMessageVO delete(Integer id) throws Exception;

    /**
     * 修改地区
     *
     * @param region
     * @return
     * @throws Exception
     */
    public ResponseMessageVO updateRegion(Region region)throws Exception;


}
